<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<input type="hidden" value="${model.id}" name="id">
<div class="form-horizontal">
    <div class="form-group">
        <label class="control-label col-md-2">金额</label>
        <div class="col-md-10">
            <input type="text" id="price" name="price" class="form-control" placeholder="请输入虚拟币整数金额，如:1"
                   value="${model.price}"/>
        </div>
    </div>
    <div class="form-group">
        <div class="col-md-offset-2 col-md-10">
            <button type="submit" class="btn btn-primary">
                <i class="fa fa-floppy-o"></i> 保存
            </button>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        $("#form3").bootstrapValidator({
            feedbackIcons: {
                valid: 'glyphicon glyphicon-ok',
                invalid: 'glyphicon glyphicon-remove',
                validating: 'glyphicon glyphicon-refresh'
            },
            fields: {
                price: {
                    validators: {
                        notEmpty: {
                            message: '不能为空'
                        },
                        stringLength: {
                            max: 11,
                            message: '长度过长'
                        },
                        regexp: {
                            regexp: /^\+?(0|[1-9][0-9]*)$/,
                            message: '非负整数'
                        }
                    }
                }

            }
        });
    });
</script>